package StudyCode.summary.myfile;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.FileSystems;
import java.nio.file.Files;
import java.util.Properties;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class LoadPropertiesFromPropertiesFile {
	public static void main(String[] args) throws Exception {
		Properties props = new Properties();
		try (InputStream in = Files.newInputStream(FileSystems.getDefault()
				.getPath(System.getProperty("user.dir") + File.separator
						+ "db_props.properties"));) {
			props.load(in);
			in.close();
		} catch (IOException ex) {
			ex.printStackTrace();

		}

	}
}
